﻿@page
@model Chino.IdentityServer.Pages.Dashboard.User.ChangePasswordModel
@inject  IStringLocalizer<Chino.IdentityServer.Pages.Dashboard.User.ChangePasswordModel> L
@inject CommonLocalizationService CL
@{
    Layout = "_DashboardLayout";
    ViewData["pageName"] = "users";
    ViewContext.ClientValidationEnabled = true;
}


<div class="mt-3 container">
    <div class="card col-lg-6">
        <div class=" card-header">
            @L["header_changePassword"]
        </div>
        <div class="card-body">
            <partial name="ValidationSummary" />

            <form method="post">
                <input asp-for="ReturnUrl" autocomplete="off" hidden />

                <div class="mb-3">
                    <label asp-for="TargetUserId" class="form-label">@CL["userId"]</label>
                    <input asp-for="TargetUserId" class="form-control" autocomplete="off" disabled />
                </div>

                <div class="mb-3">
                    <label asp-for="TargetUser.UserName" class="form-label">@CL["username"]</label>
                    <input asp-for="TargetUser.UserName" class="form-control" autocomplete="off" disabled />
                </div>

                <div class="mb-3">
                    <label asp-for="InputModel.NewPassword" class="form-label">@CL["newPassword"]</label>
                    <input asp-for="InputModel.NewPassword" class="form-control" autocomplete="off" />
                    <div><span asp-validation-for="InputModel.NewPassword" class="text-danger"></span></div>
                </div>

                <div class="mb-3">
                    <label asp-for="InputModel.ConfirmNewPassword" class="form-label">@L["confirmNewPassword"]</label>
                    <input asp-for="InputModel.ConfirmNewPassword" class="form-control" id="newPassword" autocomplete="off" />
                    <div><span asp-validation-for="InputModel.ConfirmNewPassword" class="text-danger"></span></div>
                </div>

                <button type="submit" class="btn btn-primary mt-2">@L["btn-submit"]</button>
            </form>
        </div>
    </div>
</div>


@section Scripts {
    @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}